| Conditions | 2 |
| Total Lines | 8 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { Inject } from '@nestjs/common'; |
||
| 14 | |||
| 15 | public async execute(query: GetTaskByIdQuery): Promise<TaskView> { |
||
| 16 | const task = await this.taskRepository.findOneById(query.id); |
||
| 17 | if (!task) { |
||
| 18 | throw new TaskNotFoundException(); |
||
| 19 | } |
||
| 20 | |||
| 21 | return new TaskView(task.getId(), task.getName()); |
||
| 22 | } |
||
| 24 |